<template>
	<el-dialog :visible.sync="options.showDialog" width="1200px" class="evalDialog" :append-to-body="true">
		<h3 class="add-title">导入明细</h3>
		<comTable :options="importResult" :height="'400px'"></comTable>
		<div class="sub-btn">
			<el-button @click="handleClick" type="primary" :disabled="isClick" size="small" style="width: 100px;">确定</el-button>
		</div>
	</el-dialog>
</template>

<script>
export default{
	components: {
		comTable: () => import("@/household/common/comTable.vue"),
	},
	props:{
		options:{
			type: Object,
			require: true
		}
	},
	data(){
		return {
			isClick: false,
			importResult: {
				list: [
					/* { title: '模板名称', prop: 'templateName', isClick: false },
					{ title: '公司名称', prop: 'companyName', isClick: false },
					{ title: '工资单月份', prop: 'distributedDate', isClick: false },
					{ title: '录入人员', prop: 'enteringName', isClick: false },
					{ title: '录入时间', prop: 'insertdate', isClick: false }, */
				],
				noOperation: false,
				operation: [],
				data: []
			},
		}
	},
	methods:{
		handleClick(){
			this.isClick = true;
			this.$emit('submitResult');
			setTimeout(() => {
				this.isClick = false;
			},3000)
		}
	},
	watch:{
		'options.showDialog'(){
			if(this.options.showDialog){
				this.importResult.list = this.options.list;
				this.importResult.data = this.options.data;
			}
		}
	}
}
</script>

<style scoped="scoped">
.add-title{padding: 30px 0 20px;font-size: 24px;text-align: center;}
.sub-btn{text-align: center;padding: 20px 0 30px;}
</style>
